﻿@model DomainModel.Entities.VehicleCategory
@{
    ViewBag.Title = "Category : " + Model.Name;
}
<h2>@ViewBag.Title</h2>
<fieldset>
    <legend>Vehicle Category</legend>
    <div class="display-label">
        Category Name</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Name)
    </div>
    <div class="display-label">
        الاسم في اللغة العربية</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Name_Ar)
    </div>
</fieldset>
<p>
    @Html.ActionLink("Edit", "Edit", new { id = Model.VehicleCategoryId }) |
    @Html.ActionLink("Back to List", "Index")
</p>
<fieldset>
    <legend>Vehicles List in @Model.Name</legend>
    <table>
        <tr>
            <th>
                Brand
            </th>
            <th>
                Model
            </th>
            <th>
                FuelType
            </th>
            <th>
                Name - الاسم
            </th>
            <th>
            </th>
        </tr>
        @foreach (var item in Model.Vehicles)
        {
            <tr>
                <td>
                    @Html.DisplayFor(modelItem => item.VehicleBrand.Name)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Model)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.FuelType)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Name) -
                    @Html.DisplayFor(modelItem => item.Name_Ar)
                </td>
            </tr>
        }
    </table>
</fieldset>
